using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region MessageBoard

	/// <summary>
	/// MessageBoard object for NHibernate mapped table 'MessageBoard'.
	/// </summary>
	public class MessageBoard
	{
		#region Member Variables
		
		protected int _id;
		protected string _userName;
		protected string _telephone;
		protected string _address;
		protected string _title;
		protected string _messageContent;
		protected DateTime _addDate;
        protected int _state;
		#endregion

		#region Constructors

		public MessageBoard() { }

		public MessageBoard( string userName, string telephone, string address, string title, string messageContent, DateTime addDate )
		{
			this._userName = userName;
			this._telephone = telephone;
			this._address = address;
			this._title = title;
			this._messageContent = messageContent;
			this._addDate = addDate;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string UserName
		{
			get { return _userName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
				_userName = value;
			}
		}

		public  virtual string Telephone
		{
			get { return _telephone; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Telephone", value, value.ToString());
				_telephone = value;
			}
		}

		public  virtual string Address
		{
			get { return _address; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Address", value, value.ToString());
				_address = value;
			}
		}

		public  virtual string Title
		{
			get { return _title; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Title", value, value.ToString());
				_title = value;
			}
		}

		public  virtual string MessageContent
		{
			get { return _messageContent; }
			set
			{				
				_messageContent = value;
			}
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}
        public virtual int State
        {
            get { return _state; }
            set { _state = value; }
        }
		

		#endregion
	}
	#endregion
}